home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 2
/
SPACE - Library 2 - Volume 1.iso
/
utility
/
603
/
emacs
/
cmd
/
bufdel.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-12-06
|
1KB
|
47 lines
set %obuff $cbufname
set $discmd FALSE
list-buffers
select-buffer "[List]"
end-of-file
set %lline $curline
beginning-of-file
4 next-line
!while &less $curline %lline
beginning-of-line
22 forward-character
insert-string "=>"
update-screen
set $discmd TRUE
set %resp &upper @"Kill this buffer? (N/Y)"
set $discmd FALSE
set %resp &upper %resp
2 delete-previous-character
!if &sequal "Y" &left %resp 1
set-mark
beginning-of-line
36 forward-character
backward-character
!while &equal $curchar 32
backward-character
!endwhile
forward-character
open-line
exchange-point-and-mark
set %bname #[List]
!if ¬ &sequal %bname %obuff
delete-buffer %bname
!endif
delete-previous-character
beginning-of-line
4 forward-character
!if ¬ &sequal %bname %obuff
overwrite-string "DELETED"
!else
overwrite-string "Buffer is being displayed."
!endif
next-line
!endwhile
set $discmd TRUE
delete-window
select-buffer %obuff